{# Template for home page of user #}
{% extends "home_base.html" %}

{% spaceless %}

{% block feeds %}
<link rel="alternate" type="application/rss+xml" title="Public Feeds" href="/feeds/group/{{grpId}}" />
{%endblock feeds%}

{% block newsol %}
{% if user.is_authenticated %}
<div class="form">
	<form action="/createsol/" method="post" enctype="multipart/form-data">
	  <table>
		{{ solForm }}
	  </table>
	  <input type="submit" value="Create" />
	</form>
</div>
{% endif %}
{% endblock newsol%}

{% block entries%}
<h2 id="latestentries">Sols in Group - {{ grpName }}: </h2>
<table class="soltable"><tbody>
    {% for sol in query_list %}
	<tr class="solrow">
		<td class="solauthor">
                <a href="{{ sol.get_author_url }}">
                        <img src="{{ sol.get_author_avatar_url }}" alt="{{ sol.get_author_nickname }}" />
                </a>
		<a href="{{ sol.get_author_url }}"> {{ sol.get_author_nickname }} </a>
		</td>
		<td class="solentry">{{ sol.body }} <br/>
		about {{ sol.date|timesince}} ago


		</td>
	</tr>
    {% endfor %}
</tbody></table>
{% endblock entries%}

{% block paginate %}
<div class="paginate">
{% if has_previous %}
	<a href='/u/{{u_id}}/p/{{ previous_page }}'>Previous</a>
	{% if has_next %} | {% endif %}
{% endif %}

{% if has_next %} <a href='/u/{{ u_id }}/p/{{ next_page }}/'>Next</a>  {% endif %}
</div>
{% endblock paginate %}
{% endspaceless %}